package com.ruoyi.base.domain;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 教材对象 base_book
 * 
 * @author yepanpan
 * @date 2020-11-09
 */
@ApiModel("教材实体")
@Getter
@Setter
public class BaseBook extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增长主键ID */
    private Long id;

    /** 适用课程 */
    @ApiModelProperty("适用课程ID")
    @NotNull(message="适用课程不能为空")
    private Long courseId;

    @Excel(name = "适用课程")
    @ApiModelProperty("适用课程")
    private String courseName;

    /** 教材名称 */
    @Excel(name = "教材名称")
    @ApiModelProperty("教材名称")
    @NotBlank(message="教材名称不能为空")
    private String title;

    /** 简称 */
    @Excel(name = "简称")
    @ApiModelProperty("简称")
    @NotBlank(message="教材简称不能为空")
    private String sname;

    /** 库存数量 */
    @Excel(name = "库存数量")
    @ApiModelProperty("库存数量")
    private Long total;

    /** 状态 */
    @Excel(name = "状态", dictType = "common_status", combo = {"启用","禁用"})
    @ApiModelProperty("状态")
    @NotBlank(message="状态不能为空")
    private String status;

   
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("courseId", getCourseId())
            .append("courseName", getCourseName())
            .append("title", getTitle())
            .append("sname", getSname())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("total", getTotal())
            .append("status", getStatus())
            .toString();
    }
}
